package com.sq.test;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.hwpf.HWPFDocument;

public class test {
	public static void main(String[] args) throws FileNotFoundException, IOException {
		
		File file= new File("D:\\search\\1.doc");
		String filename = file.getName();
		String str=filename.substring(filename.lastIndexOf(".")+1);
		
       
		System.out.print(str);
	}
}

